home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 4 / The Arsenal Files 4 (Arsenal Computer).ISO / casm / au116-as.exe / UTIL / THRESH.CPP < prev    next >
C/C++ Source or Header  |  1994-11-09  |  663b  |  28 lines

  1. #include "..\au.hpp"
  2.  
  3. /*****************************************************************************/
  4. long check_threshold(AU *au, int threshold, BYTE ignoreSecond)
  5. {
  6.     int   num_to_process;
  7.  
  8.     au_printf_c(au, 14, "   Counting files to process...\n\n");
  9.  
  10.     num_to_process = count_process_files(au);
  11.     if (threshold >= 0)
  12.     {
  13.         if (num_to_process == 0)
  14.         {
  15.             au_printf_c(au, 4, NOTHING);
  16.             exit(0);
  17.         }
  18.         if (num_to_process > threshold && !ignoreSecond)
  19.         {
  20.             au_printf_error(au, "Threshold of %d files Exceeded, %d pending process",
  21.                    threshold, num_to_process);
  22.             if (!ask_continue())
  23.                 exit(0);
  24.         }
  25.     }
  26.     return num_to_process;
  27. }
  28.